(1) Field of the Invention
The present invention relates to an IC card (smart card) reading/writing apparatus and an IC card system. In particular, the present invention relates to an IC card reading/writing apparatus having both an intelligent function and a pass-through function, and an IC card system using the IC card reading/writing apparatus.
(2) Description of the Related Art
There is a tendency recently to distribute processes (functions) in a system in order to reduce the burden on a host system from terminals or the like. In a card system using an IC (Integrated Circuit) card, an intelligent-type IC card reading/writing (R/W: Reader/Writer) apparatus is used. Such apparatuses having a so-called intelligent function, in which an application is built to process the card data first instead of the host system like a personal computer, are spreading.
FIG. 14 is a diagram showing an example of a general IC card system. In FIG. 14, reference numeral 101 denotes an IC card, reference numeral 102 denotes an IC card reading/writing (R/W) apparatus (equipment), and reference numeral 103 denotes an intelligent-type IC card R/W apparatus. Reference numerals 104 and 105 denote a personal computer and a printing apparatus of which a host system of the IC card R/W apparatus 102 and 103 consist.
The IC card R/W apparatus 102 has a so-called pass-through function to control read-out/write-in processing for the IC card 101 by an application on the personal computer 104. The IC card R/W apparatus 102 has, for example, a communication control unit 102a, a mechanism control unit 102b, a mechanism unit 102c and an IC card commands processing unit 102d, as shown in FIG. 15. Also, reference numeral 104a in the personal computer 104 denotes an application unit.
The communication control unit 102a identifies a type of a R/W command (an R/W control command, an IC card command and so on, described later) received from the personal computer 104 to control a communication (transmission/reception of a command/response) with the IC card 101 according to a result of the identification. The mechanism control unit 102b transmits an instruction to insert (i.e., xe2x80x9cfetchxe2x80x9d) or discharge the IC card 101 to the mechanism unit 102c if the type of the R/W command accepted through the communication control unit 102a is a R/W control command, which instructs to insert/discharge the IC card 101.
The mechanism unit 102c drives a motor or the like according to the instruction to insert/discharge the IC card 101 from the mechanism control unit 102b so as to insert/discharge the IC card 101. The IC card command processing unit 102d transmits a card command to get card data of the IC card 101 described later if a type of the R/W command received by the communication control unit 102a is an IC card command. Unit 102d transmits a response (including data from the IC card 101) thereto to the personal computer 6. Using this function (the pass-through function), the application unit 104a of the personal computer 104 can directly process the card data (a reading/writing process) in the IC card 101.
With the above structure, the above-mentioned IC card R/W apparatus 102 performs an inserting/discharging process on the IC card 101 according to an instruction from the upper system (the personal computer 104 or the like). In addition, the IC card command processing unit 102d transfers the card data of the inserted IC card 101 as a response to the host system. In this manner, the application (the application unit 104a of the personal computer 104) of the host system directly performs a reading/writing process (a card data process) on the IC card 101.
The operation of the above-mentioned IC card system can be described as the following with reference to the flowchart (Steps A1 through A8) shown in FIG. 16.
When the power source for the IC card R/W apparatus 102 is switched on, the IC card R/W apparatus 102 comes to a state of waiting for a command from the host system (NO route at Step A1). If the R/W command, for example, is transmitted from the personal computer 104 (Step A2) and the IC card R/W apparatus 102 receives this R/W command (if a decision at Step A1 is YES), the IC card R/W apparatus 102 checks whether the type of the received R/W command is the R/W control command or the IC card command (Steps A3 and A4).
If the received R/W command is an R/W control command (if a decision at Step A3 is YES), the mechanism control unit 102b of the IC card R/W apparatus 102 controls the mechanism unit 102c to drive a motor to insert/discharge the IC card 101 (Step A5). Then the IC card RAN apparatus 102 transmits a command response to the R/W control command, which shows the process completed normally, to the personal computer 104 (Step A8).
If the command from the personal computer 104 is an IC card command (if a decision at Step A3 is NO and at Step A4 is YES), the communication control unit 102a and the IC card command processing unit 102d of the IC card R/W apparatus 102 perform an IC card command process on the IC card 101 as the follows. The IC card R/W apparatus 102 converts the communication protocol of the card command to instruct reading/writing processing for the IC card 101, the instructed processing being adapted to the IC card 101, and transmits the card command to the IC card 101. Further, the IC card R/W apparatus 102 receives a response (a card response) to the transmitted card command. Apparatus 102 converts the communication protocol of this card response (including the card data of the IC card 101) into the original communication protocol adapted to the personal computer 104 (Step A6).
The IC card R/W apparatus 102 then transmits a command response to the R/W control command, which shows the process was completed normally, to the personal computer 104 (Step A8). In the personal computer 104, having received this command response, the application unit 104a performs a data process on the card data of the IC card 101 transmitted as the response. That is, in the IC card R/W apparatus 102, the writing/reading process on the IC card 101 is directly performed, not by the IC card R/W apparatus 102 itself, but rather by the application unit 104a of the personal computer 104.
If the R/W command received from the personal computer 104 at Step A1 is neither a R/W control command nor an IC card command (if decisions at both Steps A3 and A4 are NO), the IC card R/W apparatus 102 generates an error response (Step A7). Apparatus 102 then transmits this response to the personal computer 104 to notify the received command is not normal (Step A8).
In FIG. 14, an intelligent-type IC card R/W apparatus 103 has a built-in application. By this application, a primary process on card data of the IC card 101 can be independently performed by the IC card R/V apparatus itself. The intelligent-type IC card R/W apparatus 103 has, for example, a communication control unit 103a, an application unit 103b, a mechanism control unit 103c an a mechanism unit 103d, as shown in FIG. 17.
The communication unit 103a controls the communication of a R/W command from the personal computer 104 (i.e., the application unit 104a therein) or the application unit 103b. The application unit 103b identifies the type of the R/W command from the personal computer 104, and executes an application processing. The application processing is to fetch (insert/discharge) the IC card, convert a communication protocol for the IC card 101, generate/transmit a card command, or the like, according to the result of the identification. The mechanism control unit 103c controls a motor or the like of the mechanism unit 103d when the application unit 103b identifies the type of the R/W command as an R/W control command to insert/discharge the IC card 101.
The above-mentioned R/W command has a format consisting of, for example, a header unit 106, an information unit 107 and a trailer unit (CRC) 108 and the like, as shown in FIG. 18. In the header unit 106, a length LEN (bytes) of the information unit 107 is stored. In the information unit 107, a R/W command identifier (for example, xe2x80x9cAPxe2x80x9d in the case of an application command) 109, a command unit 110 and the like are stored. The IC card R/W apparatus 103 can determine whether a received R/W command is an application command or not based on the R/W command identifier 109.
A process in the intelligent-type IC card R/W apparatus 103 with the above structure can be described in detail through the following with reference to the flowchart (Steps B1 through B8) shown in FIG. 19.
When the IC card R/W apparatus 103 is activated (when a power source is switched on), the IC card R/W apparatus 103 comes to a command reception waiting state (NO route at Step B1). If the application unit 104a of the personal computer 104 transmits any command (the R/W command, for example), (Step B2) and the IC card R/W apparatus 103 receives this R/W command. The IC card R/W apparatus 103 determines whether this R/W command is an application command or not based on the R/W command identifier 109 (refer to FIG. 18) stored in the R/W command (Step B3).
If the received R/W command is an application command (if the decision at Step B3 is YES), the IC card R/W apparatus 103 further determines whether this R/W command is a R/W control command to instruct to insert/discharge the IC card 101 or not (Step B4). If the R/W command is a R/W control command (if a decision at Step B4 is YES), the mechanism control unit 103c controls the mechanism unit 103d to insert/discharge the IC card 101 (Step B5). The IC card R/W apparatus 103 then transmits a command response to the received R/W command (the application command) which shows the process completed normally to the personal computer 104 (Step B8).
If the received R/W command is not a R/W control command (if the decision at Step B4 is NO), the application unit 103b of the IC card R/W apparatus 103 performs application processes. These application processes are such as generating and transmitting a card command to the IC card 101, receiving a card response from the IC card 101, a card data process, and generating a command response to the personal computer 104 (Step B6). Application unit 103b then transmits the generated command response to the personal computer 104 (Step B8).
If the received R/W command is not an application command (if a decision at Step B3 is NO), the communication control unit 103a of the IC card R/W apparatus 103 generates an error response (Step B7). The communication control unit 103a then transmits this error response to the personal computer 104 so as to notify that the process in response to the received R/W command could not be normally performed (Step B8).
In the intelligent-type IC card R/W apparatus 103 described above, the built-in application unit 103b is controlled according to an application command from the host apparatus such as the personal computer 104. An application process by the application unit 103b enables a primary process on card data.
There is another type of the intelligent-type IC card R/W apparatus 103. When this type of IC card R/W apparatus 103 is activated, the built-in application unit 103b is automatically activated. When the IC card 101 is inserted, the application unit 103b performs a primary process on card data of the IC card 101 by the application process described above, without a command from the personal computer 104.
In this case, when the IC card R/W apparatus 103 is activated as shown in FIG. 20, for example, the IC card R/W apparatus 103 first automatically activates the application unit 103b in itself and comes to a state of waiting for the IC card 101 to be inserted (NO route at Step C1). When the IC card 101 is inserted (if a decision at Step C1 is YES), the application unit 103b transmits the R/W control command to the mechanism control unit 103c (Step C2). The mechanism control unit 103c then controls the mechanism unit 103d to fetch the IC card 101.
Subsequently, the application unit 103b of the IC card R/W apparatus 103 performs a card accessing process. This is a process such as generating and transmitting a card command to the inserted IC card 101, or receiving a card response from the IC card 101 (Step C3). Application unit 103b then executes a card data process such as editing card data of the IC card 101 (Step C4).
When the card data process is terminated in the IC card R/W apparatus 103, the application unit 103b transmits a R/W control command to instruct to discharge the IC card 101 to the mechanism control unit 103c (Step C5). The mechanism control unit 103c controls the mechanism unit 103d to discharge the IC card 101 (Step C6).
If the IC card R/W apparatus receives a command to require data of the IC card 101, after having finished the card data process from the personal computer 104 but while the process as above is being executed (Step C7), for example, the IC card R/W apparatus 103 executes a communication interrupting process as follows.
The IC card R/W apparatus 103 first inhibits an interruption which is caused by accepting a command from another host system (Step C8). The IC card R/W apparatus 103 then edits card data of the IC card 101 after having finished the data process (Step C9) and transmits it to the personal computer 104 as a command response (Steps C10 and C11). Apparatus 103 then permits an interruption from another host system (Step C12).
As an apparatus performing a reading/writing process on the IC card 101, there are, in general, provided the IC card R/W apparatus 102 and the IC card R/W apparatus 103. The apparatus 102 has a pass-through function to implement an operation (a card inserting/discharging, a data process, etc.) on the IC card 101 by the application unit 104a of the personal computer 104. The intelligent-type IC card R/W apparatus 103 has an application function to implement an operation on the IC card 101 by the application unit 103b built-in, as above.
However, each of the IC card R/W apparatus 102 and the above-mentioned intelligent-type IC card R/W apparatus 103 has only either one of the pass-through function or the application function. In consequence, it is impossible to use, for example, the intelligent type IC card R/W apparatus 103 as the IC card R/W apparatus 102 having the pass-through function.
A process such as directly accessing the IC card 101 from the personal computer 104 by the application unit 104a of the personal computer 104 may be desired (if the pass-through function is desired to be used) in an IC card system using the intelligent-type IC card RNW apparatus 103, for example. In such a case, it is necessary to newly connect the IC card R/W apparatus 102 having the pass-through function mentioned above to a host system such as the personal computer 104. This is quite disadvantageous in cost.
In the light of the above problem, an object of the present invention is to provide an IC card reading/writing apparatus and an IC card system, which can minimize the cost required to configure the IC card system by providing both the intelligent function and the pass-through function to the IC card reading/writing apparatus so that it is possible to perform a reading/writing process on an IC card with either function.
The present invention therefore provides an IC card reading/writing apparatus comprising an IC card reading/writing control unit having an intelligent function to control read-out/write-in processing for an IC card by an application unit in itself. The IC card reading/writing control unit has, in addition to the intelligent function, a pass-through function to control read-out/write-in processing for the IC card by an application unit in a host for an IC card reading/writing apparatus by receiving a pass-through command from the host.
The present invention also provides an IC card system comprising an IC card, an intelligent-type IC card reading/writing apparatus to execute read out/write-in processing for the IC card by an application unit in itself, and a host for the IC card reading/writing apparatus. The host is able to send a pass-through command to the IC card reading/writing apparatus. The IC card reading/writing apparatus includes an IC card reading/writing control unit having an intelligent function to control read-out/write-in processing for the IC card by an application unit in itself. The IC card reading/writing control unit has, in addition to the intelligent function, a pass-through function to control read-out/write-in processing for the IC card by an application unit in the host when receiving a pass-through command from the host.
According to the IC card reading/writing apparatus and the IC card system of this invention, one IC card reading/writing apparatus may be used as either an apparatus with the intelligent function or an apparatus with the pass-through function. It is therefore possible to simplify the configuration of the IC card system, largely reduce the cost required to build the system, and contribute to flexibility of the configuration of the system.
The present invention further provides an IC card reading/writing apparatus comprising an IC card reading/writing control unit having an intelligent function to control read-out/write-in processing for an IC card by an application unit in itself and a pass-through function to control read-out/write-in processing for the IC card by means of an application unit in a host for an IC card reading/writing apparatus by receiving a pass-through command from the host. The IC card reading/writing apparatus also includes an operation mode control unit for making the IC card reading/writing apparatus be in a selected state of either the intelligent function or the pass-through function in the IC card reading/writing control unit according to the operation mode set in response to the 5 operation mode command received from the host.
The present invention still further provides an IC card system comprising an IC card, an intelligent-type IC card reading/writing apparatus to execute readout/write-in processing for the IC card by an application unit in itself, and a host for an IC card reading/writing apparatus. The host is able to send a pass-through command to the IC card reading/writing apparatus. The IC card reading/writing apparatus includes an IC card reading/writing control unit having an intelligent function to control read-out/write-in processing for the IC card by an application unit in itself and a pass-through function to control read-out/write-in processing for the IC card by an application unit in the host by receiving a pass-through command from the host. The IC card reading/writing apparatus further includes an operation mode control unit for making the IC card reading/writing apparatus be in a state of either the intelligent function or the pass-through function in advance according to a setting command to select the function without receiving the operation mode command.
According to the IC card reading/writing apparatus and the IC card system of this invention, it is possible to use the IC card reading/writing apparatus as an apparatus with a desired function by designating the function through an operation mode command once without the necessity of designating the intelligent function or the pass-through function each time through a command from the host. This feature may largely contribute to a reduction in cost required to built the system and a flexibility of the configuration of the system. Particularly, this feature is very effective if it is known beforehand whether the IC card reading/writing apparatus will be used as an apparatus having either the intelligent function or the pass-through function.